home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Interfaces / MPW Interfaces / RIncludes / CTBTypes.r < prev    next >
Encoding:
Text File  |  1993-09-17  |  5.9 KB  |  260 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        CTBTypes.r
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. */
  11.  
  12.  
  13. #ifndef __CTBTYPES_R__
  14. #define __CTBTYPES_R__
  15.  
  16.  
  17. /*----------------------------cbnd • Tool resource bundle list ------------------*/
  18. /*----------------------------fbnd • Tool resource bundle list ------------------*/
  19. /*----------------------------tbnd • Tool resource bundle list ------------------*/
  20. type 'cbnd' {
  21.         integer = $$CountOf(TypeArray) - 1;
  22.         array TypeArray {
  23.                 literal longint;                                /* Type                 */
  24.                 integer = $$CountOf(IDArray) - 1;
  25.                 wide array IDArray {
  26.                         integer;                                /* Local ID             */
  27.                         integer;                                /* Actual ID            */
  28.                 };
  29.         };
  30. };
  31.  
  32.  
  33. type 'fbnd' as 'cbnd';
  34.  
  35. type 'tbnd' as 'cbnd';
  36.  
  37. /*----------------------------flst • Font Family List----------------------------*/
  38. type 'flst' {
  39.         integer = $$CountOf(Fonts);                                /* # of fonts            */
  40.         array Fonts {
  41.             pstring;                                            /*         Font NAME        */
  42.             align word;
  43.             unsigned hex integer    plain;                        /*         Font Style        */
  44.             integer;                                            /*        Font Size        */
  45.             integer;                                            /*         Font Mode        */
  46.         };
  47. };
  48.  
  49.  
  50. /*----------------------------caps • Connection tool capabilities list-----------*/
  51.  
  52. /* Define flags for "Channels" field of 'caps' resource */
  53. #define cmData                (1 << 0)
  54. #define cmCntl                (1 << 1)
  55. #define cmAttn                (1 << 2)
  56.  
  57. #define    cmDataNoTimeout         (1 << 4)
  58. #define    cmCntlNoTimeout     (1 << 5)
  59. #define cmAttnNoTimeout     (1 << 6)
  60.  
  61. #define cmDataClean            (1 << 8)
  62. #define cmCntlClean            (1 << 9)
  63. #define cmAttnClean            (1 << 10)
  64.  
  65. //    for end of message field of caps resource
  66. #define cmFlagsEOM            (1 << 0);
  67.  
  68. /* Connection tool capabilities resource */
  69. type 'caps' {
  70.     integer = $$CountOf (PairsArray);
  71.     
  72.     array PairsArray {
  73.  
  74.         switch {
  75.             case Abort:
  76.                 key literal longint     = 'ABRT';
  77.                 literal longint
  78.                     supported         = 1,
  79.                     notSupported     = 0;
  80.     
  81.             case AppleTalkBased:
  82.                 key literal longint        = 'ATLK';
  83.                 longint    appletalkBased        =    1,
  84.                         notAppletalkBased    =    0;
  85.                         
  86.             case Break:
  87.                 key literal longint     = 'BRK ';
  88.                 literal longint
  89.                     synchronousOnly     = 'SYNC',
  90.                     asynchronousOnly     = 'ASYN',
  91.                     both                 = 'BOTH',
  92.                     notSupported         = 0;
  93.                     
  94.             case Channels:
  95.                 key literal longint     = 'CHAN';
  96.                 hex longint;
  97.                     
  98.             case Close:
  99.                 key literal longint     = 'CLOS';
  100.                 literal longint
  101.                     synchronousOnly     = 'SYNC',
  102.                     asynchronousOnly     = 'ASYN',
  103.                     both                 = 'BOTH',
  104.                     notSupported         = 0;
  105.                     
  106.             case EndOfMessage:
  107.                 key literal longint     = 'EOM ';
  108.                 hex longint;
  109.                 
  110.             case Kill:
  111.                 key literal longint     = 'KILL';
  112.                 literal longint
  113.                     supported         = 1,
  114.                     notSupported     = 0;
  115.                     
  116.             case Listen:
  117.                 key literal longint     = 'LSTN';
  118.                 literal longint
  119.                     synchronousOnly     = 'SYNC',
  120.                     asynchronousOnly     = 'ASYN',
  121.                     both                 = 'BOTH',
  122.                     notSupported         = 0;
  123.                     
  124.             case LowLevelIO:
  125.                 key literal longint     = 'LLIO';
  126.                 literal longint
  127.                     supported         = 1,
  128.                     notSupported     = 0;
  129.                     
  130.             case MinimumMemory:
  131.                 key literal longint     = 'MEMM';
  132.                 hex longint;
  133.                     
  134.             case Open:
  135.                 key literal longint     = 'OPEN';
  136.                 literal longint
  137.                     synchronousOnly     = 'SYNC',
  138.                     asynchronousOnly     = 'ASYN',
  139.                     both                 = 'BOTH',
  140.                     notSupported         = 0;
  141.                     
  142.             case Order:
  143.                 key literal longint     = 'ORDR';
  144.                 longint guaranteed         = 1, 
  145.                         notGuaranteed     = 0;
  146.                 
  147.             case Protocol:
  148.                 key literal longint     = 'PROT';
  149.                 literal longint
  150.                     ISDN    = 'ISDN',
  151.                     TCP     = 'TCP ',
  152.                     ADSP     = 'ADSP',
  153.                     NSP     = 'NSP ',
  154.                     LAT     = 'LAT ',
  155.                     NSPg     = 'NSPg',
  156.                     LATg     = 'LATg',
  157.                     Serial     = 'SERD',
  158.                     Modem    = 'MODM',
  159.                     MacPAD     = 'PAD ';
  160.                     
  161.             case Read:
  162.                 key literal longint     = 'READ';
  163.                 literal longint
  164.                     synchronousOnly     = 'SYNC',
  165.                     asynchronousOnly     = 'ASYN',
  166.                     both                 = 'BOTH',
  167.                     notSupported         = 0;
  168.                     
  169.             case RecommendedMemory:
  170.                 key literal longint     = 'MEMR';
  171.                 hex longint;
  172.                     
  173.             case Reliability:
  174.                 key literal longint     = 'RELY';
  175.                 longint guaranteed         = 1, 
  176.                         notGuaranteed     = 0;
  177.                 
  178.             case Service:
  179.                 key literal longint     = 'SERV';
  180.                 literal longint
  181.                     Datagram             = 'DGRM',
  182.                     Stream                 = 'STRM';
  183.             
  184.             case Timeout:
  185.                 key literal longint     = 'TOUT';
  186.                 literal longint
  187.                     supported         = 1,
  188.                     notSupported     = 0;
  189.                     
  190.             case Write:
  191.                 key literal longint     = 'WRIT';
  192.                 literal longint
  193.                     synchronousOnly     = 'SYNC',
  194.                     asynchronousOnly     = 'ASYN',
  195.                     both                 = 'BOTH',
  196.                     notSupported = 0;
  197.                     
  198.             case XTI:                                /* reserved for Apple for now… */
  199.                 key literal longint     = 'XTI ';
  200.                 literal longint
  201.                     notSupported = 0;
  202.                     
  203.         };
  204.     };
  205. };
  206.  
  207. /*----------------------------faps • File Transfer tool capabilities list-----------*/
  208. type 'faps' {
  209.     integer = $$CountOf (PairsArray);
  210.     
  211.     array PairsArray {
  212.         switch {
  213.             case BatchTransfers:                    /* i.e. support for FTSend/FTReceive */
  214.                 key literal longint        = 'BXFR';
  215.                 literal longint
  216.                     supported            =     1,
  217.                     notSupported        =     0;
  218.     
  219.             case FileTypesSupported:                /* types of files that can be transferred */
  220.                 key literal longint        = 'TYPE';
  221.                 literal longint
  222.                     textOnly            =    'TEXT',
  223.                     allTypes            =    '????';
  224.                 
  225.             case TransferModes:                        /* send/receive or both */
  226.                 key literal longint     = 'MODE';
  227.                 literal longint
  228.                     sendOnly            =     'SEND',
  229.                     receiveOnly            =    'RECV',
  230.                     sendAndReceive         =     'BOTH',
  231.                     notSupported         =     0;
  232.         };
  233.     };
  234. };
  235.  
  236. /*----------------------------taps • Terminal tool capabilities list-----------*/
  237. type 'taps' {
  238.     integer = $$CountOf (PairsArray);
  239.     
  240.     array PairsArray {
  241.         switch {
  242.             case TerminalSearching:                    /* i.e. support for TMAddSearch */
  243.                 key literal longint        = 'SRCH';
  244.                 literal longint
  245.                     supported            =     1,
  246.                     notSupported        =     0;
  247.     
  248.             case TerminalType:                /* types of files that can be transferred */
  249.                 key literal longint        = 'TYPE';
  250.                 literal longint
  251.                     graphicsTerminal    =    'GRFX',
  252.                     textTerminal        =    'TEXT',
  253.                     both                =    'BOTH';
  254.                 
  255.         };
  256.     };
  257. };
  258.  
  259. #endif __CTBTYPES_R__
  260.